package pers.mobian.springfirst.factorybean;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

/**
 * @Date 2021/7/9 18:57
 * @Created mobian
 * @Description
 */
@Component("ddd")
public class MoBianFactoryBean implements FactoryBean {
	@Override
	public Object getObject() throws Exception {
		System.out.println("使用实现接口的方式创建了一个bean");
		MoBian moBian = new MoBian();
		return moBian;
	}

	@Override
	public Class<?> getObjectType() {
		return MoBian.class;
	}
}
